<?php
declare (strict_types = 1);

namespace app\api\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class SpecGoods extends Model
{
    protected $table='ea_spec_goods';

    public function goods()
    {
        return $this->belongsTo('Goods','goods_id');
    }

    /***
     * @param $id
     * @return array|Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function specGoodsDetails($id)
    {
      return self::where('id','=',$id)->find();
    }

    public function collageGoods($ids)
    {
        return self::select($ids);
    }
}
